// IPluginManager.cs
// 
// Copyright © 2009 FreeZzaph
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
//

using System;

namespace LibFreeZzaph
{	
	
	public interface IPluginManager
	{
		/// <summary>
		/// Registers a command with the plug-in manager. The application that
		/// makes use of LibFreeZzaph will, after loading all plug-ins, fetch
		/// all the registered commands, and present them to the user in some
		/// way.
		/// </summary>
		/// <param name="type">
		/// Your IFreeZzaphPlugin implementation class type. This is used to separate
		/// commands from different plug-ins. The PluginManager will check that this
		/// type is a type of IFreeZzaphPlugin, and if not, will throw an
		/// ArgumentException.
		/// </param>
		/// <param name="command">
		/// The command name. This name should be short, must be all lowercase,
		/// contain no whitespace and no special characters.
		/// Hyphens and underscores are allowed.
		/// </param>
		/// <param name="description">
		/// A description of what the command does. Should be relatively short,
		/// should just be a human-friendly version of the command name.
		/// </param>
		/// <param name="commandHandler">
		/// The function that will handle the call to this command.
		/// </param>
		void RegisterCommand(Type type, string command, string description, EventHandler<PluginCommandEventArgs> commandHandler);
		
	}
}
